import { myEnv } from '@/myEnv';
import { Immit } from '@/utils';

export abstract class MyMessageList_Abs extends Immit {
    /** 消息主键 */
    id: string = '';
    /** 是否已读 是否已读 1为已读*/
    abstract haveRead: 0 | 1 | boolean;
    /**  消息内容*/
    content: string = '';
    /** 消息类型三个类型分别是 -系统 -订单 -交互 sys, order, interact*/
    type: 'sys'|'order'|'interact';
}

export class MyMessageList_Web extends MyMessageList_Abs {
    haveRead: boolean = false;
    immit_response?(data: Partial<MyMessageList_Res>) {
        this.immit(data);
        this.haveRead = data.haveRead == 0? false:true
        return this;
    }
}

export class MyMessageList_Res extends MyMessageList_Abs {
    haveRead: 0 | 1 = 0;
}
